package com.oig.sys.minio.config;


import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Slf4j
@Data
@ConfigurationProperties(prefix = "minio")
public class MinIOProperties implements InitializingBean {

    /**minio的路径**/
    private String endpoint;

    /**minio的accessKey**/
    private String accessKey;

    /**minio的secretKey**/
    private String secretKey;

    /** 临时桶，所有文件先上传到临时桶，再copy到业务桶 */
    private String tempBucket;

    /**下载地址**/
    private String httpUrl;

    /**图片大小限制**/
    private Long imgSize;

    /**文件大小限制**/
    private Long fileSize;

    /**文件按日期目录存储**/
    private Boolean openDateDir = Boolean.TRUE ;

    @Override
    public void afterPropertiesSet()  {
        log.debug("MinIOProperties");
    }
}
